import java.util.Arrays;

public class Solution706 {

    int[] f=new int[1000001];

    public Solution706() {
        Arrays.fill(f,Integer.MIN_VALUE);
    }

    public void put(int key, int value) {
        f[key]=value;
    }

    public int get(int key) {
        return f[key]==Integer.MIN_VALUE?-1:f[key];
    }

    public void remove(int key) {
        f[key]=Integer.MIN_VALUE;
    }

    public static void main(String[] args) {
        Solution706 solution706=new Solution706();
        solution706.put(1, 1);
        solution706.put(2, 2);
        System.out.println(solution706.get(1));
        System.out.println(solution706.get(3));
        solution706.put(2, 1);
        System.out.println(solution706.get(2));
        solution706.remove(2);
        System.out.println(solution706.get(2));
    }
}
